home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / dragon-runner.swf / scripts / EnemyManager.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  2.7 KB  |  103 lines

  1. package
  2. {
  3.    import flash.display.Sprite;
  4.    
  5.    public class EnemyManager extends Sprite
  6.    {
  7.        
  8.       
  9.       private var ┬º\x01\x01\x02\t┬º:* = null;
  10.       
  11.       internal const DRAGONHEIGHT:* = 600;
  12.       
  13.       internal const DOC_MIDV:* = 200;
  14.       
  15.       internal const DRAGONINITY:* = 60;
  16.       
  17.       internal const DOC_HEIGHT:* = 400;
  18.       
  19.       internal const DRAGONINITX:* = 0;
  20.       
  21.       internal const DRAGONATTACKUPPER:* = 2;
  22.       
  23.       public var theKnight:*;
  24.       
  25.       private var ┬º\x01\x01\x06\r┬º:* = null;
  26.       
  27.       internal const DRAGONWIDTH:* = 700;
  28.       
  29.       internal const DOC_QUARTI:* = 160;
  30.       
  31.       internal const DOC_TOP:* = 0;
  32.       
  33.       internal const DRAGONATTACKBITE:* = 4;
  34.       
  35.       internal const DRAGONATTACKBLAST:* = 1;
  36.       
  37.       private var ┬º\x01\x01\x04\x0e┬º:Boolean = false;
  38.       
  39.       private var ┬º\x01\x01\x03\x0e┬º:*;
  40.       
  41.       internal const DOC_WIDTH:* = 640;
  42.       
  43.       internal const DRAGONATTACKFIRE:* = 3;
  44.       
  45.       internal const DOC_LEFT:* = 0;
  46.       
  47.       public var theDragon:* = null;
  48.       
  49.       internal const DRAGONHIDE:* = 0;
  50.       
  51.       internal const DOC_MIDH:* = 320;
  52.       
  53.       internal const DOC_QUARTII:* = DOC_MIDH + DOC_QUARTI;
  54.       
  55.       public function EnemyManager(param1:*, param2:*, param3:*)
  56.       {
  57.          ┬º\x01\x01\x04\x0e┬º = false;
  58.          ┬º\x01\x01\x02\t┬º = null;
  59.          ┬º\x01\x01\x06\r┬º = null;
  60.          theDragon = null;
  61.          super();
  62.          ┬º\x01\x01\x02\t┬º = param1;
  63.          ┬º\x01\x01\x06\r┬º = param2.GetSceneContainer();
  64.          ┬º\x01\x01\x03\x0e┬º = param3;
  65.       }
  66.       
  67.       public function StopGame() : *
  68.       {
  69.          ┬º\x01\x01\x07\x05┬º();
  70.       }
  71.       
  72.       public function StartGame() : *
  73.       {
  74.          theKnight = ┬º\x01\x01\x03\x0e┬º.mainChar;
  75.          ┬º\x01\x01\x07\x04┬º();
  76.       }
  77.       
  78.       private function ┬º\x01\x01\x07\x04┬º() : *
  79.       {
  80.          ┬º\x01\x01\x07\x05┬º();
  81.          theDragon = new dragon();
  82.          theDragon.Init(┬º\x01\x01\x02\t┬º,┬º\x01\x01\x06\r┬º,this);
  83.          theDragon.x = DRAGONINITX;
  84.          theDragon.y = DRAGONINITY;
  85.          theDragon.width = DRAGONWIDTH;
  86.          theDragon.height = DRAGONHEIGHT;
  87.          ┬º\x01\x01\x06\r┬º.addChild(theDragon);
  88.          ┬º\x01\x01\x06\r┬º.setChildIndex(theDragon,0);
  89.          ┬º\x01\x01\x06\r┬º.setChildIndex(theKnight,1);
  90.       }
  91.       
  92.       private function ┬º\x01\x01\x07\x05┬º() : *
  93.       {
  94.          if(theDragon)
  95.          {
  96.             theDragon.Destroy();
  97.             ┬º\x01\x01\x06\r┬º.removeChild(theDragon);
  98.             theDragon = null;
  99.          }
  100.       }
  101.    }
  102. }
  103.